package com.ccsoft.gsms.utils;

import lombok.Getter;
import lombok.ToString;

/**
 * @ClassName:BusinessException
 * @Description:TODO
 * @Author:chanchaw
 * @Date:2019-12-24 8:12
 * @Version:1.0
 **/
@Getter
@ToString
public class BusinessException extends RuntimeException {
    private String msg;

    public BusinessException(String msg) {
        this.msg = msg;
    }

    private BusinessException() {
        this.msg = "存在关联数据，操作失败！";
    }

    public static BusinessException instance(){
        return new BusinessException();
    }

    public static BusinessException instance(String msg){
        return new BusinessException(msg);
    }
}
